(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

SINAMICS G120 - ROS Configuration

Description: This tutorial teaches you how to configure yaml and launch files according to TIA Portal config from previous tutorial

Keywords: SIEMENS, CP1616, SINAMICS, PROFINET, TIA Portal, Configuration

Tutorial Level: INTERMEDIATE

Next Tutorial: siemens_cp1616/Tutorials/SINAMICS G120 - User node

TIA Portal configuration

In previous tutorial we have successfully configured PROFINET network including SINAMICS G120 drive and CP1616 to transfer Standard Telegram 1 data between IO Controller (CP1616) and IO Device (SINAMICS G120):

G120_step_2.png

The most important step on Linux side is to pass telegram configuration to ROS Wrapper. Yaml configuration files are utilized for such a purpose.

Yaml file

For telegram configuration as shown in the picture above, appropriate .yaml file will have following structure:

- label: Drive_1_input
  type: input
  size: 4
  starting_address: 256
  topic: drive_1_input_topic

- label: Drive_1_output
  type: output
  size: 4
  starting_address: 256
  topic: drive_1_output_topic

NOTE: 1 word = 2 bytes, therefore PZD2/2 means data transfer area of size 4 bytes in both directions.

Launch file

.yaml filepath needs to be uploaded on ROS Parameter server before launching wrapper node. User node explained in detail in next tutorial can also be added to the launch file here:

<param name="filepath" value="$(find siemens_cp1616_sinamics_g120_tutorial)/config/test_config.yaml"/>

  <!--   Wrapper node  -->
  <node
    name="siemens_cp1616_io_controller_wrapper"
    pkg="siemens_cp1616"
    type="io_controller_wrapper"
    output="screen" />

  <!--   User node -->
  <node
    name="siemens_cp1616_sinamics_g120_tutorial"
    pkg="siemens_cp1616_sinamics_g120_tutorial"
    type="siemens_cp1616_sinamics_g120_tutorial_node"
    output="screen" />

After completing ROS configuration you can proceed to next tutorial and learn how to interface PROFINET from C++ code by creating creating simple ROS node.

Next tutorial: SINAMICS G120 - User Node

Wiki: siemens_cp1616/Tutorials/SINAMICS G120 - ROS Configuration (last edited 2016-08-23 19:01:52 by FrantisekDurovsky)